package com.glorystone.ins.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.dao.CapitalRecordMapper;
import com.glorystone.ins.dao.InsuranceMapper;
import com.glorystone.ins.domain.CapitalRecord;
import com.glorystone.ins.interceptor.PageList;
import com.glorystone.ins.service.InsuranceService;
import com.glorystone.ins.vo.OrderVo;


@Service
public class InsuranceServiceImpl implements InsuranceService{

	@Autowired
	private InsuranceMapper insuranceMapper;
	@Autowired
	private CapitalRecordMapper capitalRecordMapper;

	@Override
	public PageList<OrderVo> selectInsuranceList(PageVo vo) {
		return insuranceMapper.selectInsuranceList(vo,vo.getPageable());
	}

	@Override
	public OrderVo findOrderByCode(String orderCode) {
		return insuranceMapper.findOrderByCode(orderCode);
	}

	@Override
	public List<CapitalRecord> selectRecordByOrderId(Long orderId) {
		List<CapitalRecord> list = capitalRecordMapper.selectRecordByOrderId(orderId);
		return list;
	}
}
